package com.csun.cmny.provider.service;


import com.csun.cmny.provider.dto.CacOldManDto;
import com.csun.cmny.provider.model.vo.CareTypeCountVo;
import com.csun.cmny.provider.pojo.CacOldman;
import com.csun.cmny.provider.vo.CacEvaluateOldManVo;
import com.csun.cmny.util.wrapper.Wrapper;

import java.util.List;
import java.util.Map;

public interface CacOldmanService {
    /**
     * 新增老人评估
     * author:liqian
     * date:2018-11-05 10:12
     */
    int insert(CacOldman cacOldman);

    /**
     * 根据评估id修改老人评估
     * author:liqian
     * date:2018-11-05 13:36
     */
    int update(CacOldman cacOldman);

    /**
     * 根据评估id删除老人评估记录
     * author:liqian
     * date:2018-11-05 13:45
     */
    int deleteByCacId(Integer cacId);

    /**
     * 根据评估id查询老人评估记录
     * author:liqian
     * date:2018-11-05 13:56
     */
    CacOldman selectByCacId(Integer cacId);

    /**
     * 查询某个机构的评估记录
     * author:liqian
     * date:2018-11-05 14:30
     */
    List<Map<String, Object>> showAll(Map<String, Object> queryMap);

    List<Map<String,Object>> getCacOldmanInfo(Map queryMap);

    Integer deleteByOldmanId(Integer oldmanId);

    /**
     * 根据评估状态和老人姓名查询评估记录
     * @param cacOldManDto
     * @return
     */
    List<CacEvaluateOldManVo> showByType(CacOldManDto cacOldManDto);

    /**
     * 分页查询评估记录--武昌版
     * @param cacOldManDto
     * @return
     */
    List<CacEvaluateOldManVo> showAllWithPage(CacOldManDto cacOldManDto);

    /**
     * 按护理类型统计老人数量
     * @param: [groupId]
     * @return: java.util.List<com.csun.cmny.provider.model.vo.CareTypeCountVo>
     */
    List<CareTypeCountVo> queryOldmanNumGroupByCareType(List<Integer> oldmanIdList);

    /**
     * 查询超过六个月未评估的老人
     * @param: [groupId]
     * @return: java.util.List<java.lang.Integer>
     */
    List<Integer> queryNeedDailyEvaluateOldmanIdList(Long groupId);

    /**
     * 根据老人id集合查询每个老人最新一条评估记录
     * @param: [cacOldManDto]
     * @return: java.util.List<CacEvaluateOldManVo>
     */
    List<CacEvaluateOldManVo> listTheLastestEvaluateRecordByOldmanIdList(CacOldManDto cacOldManDto);

    /*
    * 查询每个老人最新一条评估记录
    * */
    List<CacEvaluateOldManVo> listTheLastestEvaluateRecord(CacOldManDto dto);

    List<Map<String,Object>> selectCacOldManAll();

    Integer updateLevelCare(List<Map<String,Object>> updateDtos);
}
